<style type="text/css" media="screen">
.n-bottom span.n-error{
    margin-top: -10px !important;
}
hr {
    margin-top: 0px;
    margin-bottom: 15px;
    border: 0;
    border-top: 1px solid #ccc;
}

</style>
<form id="add-form" class="form-horizontal  nice-validator n-default n-bootstrap" role="form" data-toggle="validator" method="POST" action="" novalidate="novalidate">
    <div class="row">
        <div class="form-group col-sm-12 text-center">
            <h3>{$row.name|htmlentities}</h3>
        </div>
    </div>
    <div class="row">

        <div class="form-group  col-sm-6 div-five_industry_id" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>五大产业:</label>
            <div class="col-xs-12 col-sm-9">
                {:build_select('row[five_industry_id]', $five_industry, $row['five_industry_id'], ['class'=>'form-control', 'data-rule'=>'required'])}
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-industry_category_ids" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>产业类别:</label>
            <div class="col-xs-12 col-sm-9">
                {:build_select('row[industry_category_ids][]',$industry_category,$row['industry_category_ids'],['id'=>"industry_category_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-chargedep_ids" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3">提报部门:</label>
            <div class="col-xs-12 col-sm-9">
                {:build_select('row[chargedep_ids][]',$chargedep,$row['chargedep_ids'],['id'=>"chargedep_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required']) }
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-registered_capital" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3">注册资本金:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control " id="registered_capital" name="row[registered_capital]" type="text" placeholder="请填写注册资本金" value="{$row.registered_capital}">
                <!-- <span class="msg-box n-bottom"></span> -->
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-investment_total" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>总投资(亿):</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control " id="investment_total" name="row[investment_total]" type="text" placeholder="请填写总投资(亿)" value="{$row.investment_total}" onkeyup="clearNoNum(this)" data-rule="required">
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-domestic_capital" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>内资金额(亿),内外资至少填一项:</label>
            <div class="col-xs-12 col-sm-9">
                <div class="input-group">
                    <input class="form-control capital" id="domestic_capital" name="row[domestic_capital]" type="text" placeholder="请填写内资金额(亿),内外资至少填一项"  value="{$row.domestic_capital}" data-rule="required(from, .capital);"data-msg-required="内外资至少填一项" onkeyup="clearNoNum(this)">
                    <span class="input-group-addon">
                        <input type="checkbox" class="pending" data-id="domestic_capital" id="N221628496338">待定
                    </span>
                </div>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-foreign_capital" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>外资金额(万美元):</label>
            <div class="col-xs-12 col-sm-9">
                <div class="input-group">
                    <input class="form-control capital" id="foreign_capital" name="row[foreign_capital]" type="text" placeholder="请填写外资金额(万美元)" value="{$row.foreign_capital}" data-rule="required(from, .capital);" data-msg-required="内外资至少填一项" onkeyup="clearNoNum(this)">
                    <span class="input-group-addon">
                        <input type="checkbox" class="pending" data-id="foreign_capital" id="N445873570229">待定
                    </span>
                </div>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-summary" style="height: 100px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>项目简介:</label>
            <div class="col-xs-12 col-sm-9">
                <textarea class="form-control " id="summary" name="row[summary]" rows="4" cols="50" placeholder="请填写项目简介"  data-rule="required">{$row.summary}</textarea>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-is_land" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>是否准入:</label>
            <div class="col-xs-12 col-sm-9">
                {:build_select('row[is_access]', [''=>'请选择','1'=>'是','0'=>'否'], $row['is_access'], ['id'=>'is_access','class'=>'form-control', 'data-rule'=>'required'])}
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-access_time" style="height: 50px; {:$row.is_access == 1?'':'display:none;'}" >
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>准入时间:</label>
            <div class="col-xs-12 col-sm-9">
                <div class="input-group" style="position: relative;">
                    <input class="form-control datetimepicker " type="text" id="access_time" name="row[access_time]" data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写准入时间" value="{$row.access_time_desc}"  data-rule="required">
                    <span class="input-group-addon">
                        <input type="checkbox" class="pending" data-id="access_time" {:$row.access_time == -100?'checked':''} id="N888544076033">待定
                    </span>
                </div>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-framework_agreement_time" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>签订框架协议时间:</label>
            <div class="col-xs-12 col-sm-9" style="position: relative;">
                <input class="form-control datetimepicker agreement" type="text" id="framework_agreement_time" name="row[framework_agreement_time]" data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写签订框架协议时间" value="{$row.framework_agreement_time_desc}" data-rule="required(from, .agreement);"data-msg-required="框架与正式协议至少填一项">
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-invesment_agreement_time" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>签订正式投资协议时间:</label>
            <div class="col-xs-12 col-sm-9">
                <div class="input-group" style="position: relative;">
                    <input class="form-control datetimepicker agreement" type="text" id="invesment_agreement_time" name="row[invesment_agreement_time]" data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写签订正式投资协议时间" value="{$row.invesment_agreement_time_desc}" data-rule="required(from, .agreement);"data-msg-required="框架与正式协议至少填一项">
                    <span class="input-group-addon">
                        <input type="checkbox" class="pending" data-id="invesment_agreement_time" id="N063971537965" {:$row.invesment_agreement_time == -100?'checked':''}>待定
                    </span>
                </div>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-register_time" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>（计划）注册时间:</label>
            <div class="col-xs-12 col-sm-9">
                <div class="input-group" style="position: relative;">
                    <input class="form-control datetimepicker " type="text" id="register_time" name="row[register_time]" data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写（计划）注册时间"  data-rule="required" value="{$row.register_time_desc}" >
                    <span class="input-group-addon">
                        <input type="checkbox" class="pending" data-id="register_time" id="N259384592807" {:$row.register_time == -100?'checked':''}>待定
                    </span>
                </div>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-is_land" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>是否拿地:</label>
            <div class="col-xs-12 col-sm-9">
                {:build_select('row[is_land]', [''=>'请选择','1'=>'是','0'=>'否'], $row['is_land'], ['id'=>'is_land','class'=>'form-control', 'data-rule'=>'required'])}
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-land_time" style="height: 50px; {:$row.is_land == 1?'':'display:none;'}">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>（计划）拿地时间:</label>
            <div class="col-xs-12 col-sm-9">
                <div class="input-group" style="position: relative;">
                    <input class="form-control datetimepicker land-time" type="text" id="land_time" name="row[land_time]" data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写（计划）拿地时间" value="{$row.land_time_desc}" >
                    <span class="input-group-addon">
                        <input type="checkbox" class="pending" data-id="land_time" id="N173786866211" {:$row.land_time == -100?'checked':''}>待定
                    </span>
                </div>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-start_construction_time" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>（计划）开工时间:</label>
            <div class="col-xs-12 col-sm-9">
                <div class="input-group" style="position: relative;">
                    <input class="form-control datetimepicker " type="text" id="start_construction_time" name="row[start_construction_time]" data-date-format="YYYY-MM-DD" data-use-current="true" placeholder="请填写（计划）开工时间"  data-rule="required" value="{$row.start_construction_time_desc}">
                    <span class="input-group-addon">
                        <input type="checkbox" class="pending" data-id="start_construction_time" id="N509396560696" {:$row.start_construction_time == -100?'checked':''}>待定
                    </span>
                </div>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-carrier_id" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>载体情况:</label>
            <div class="col-xs-12 col-sm-9">
                {:build_select('row[carrier_id]', $carrier, $row.carrier_id, ['id'=>'carrier_id','class'=>'form-control', 'data-rule'=>'required','style'=>'width:42%;','data-rule'=>'required'])}
                <input class="form-control " style="width:42%;" name="row[carrier_id_relation]" id="carrier_id_relation" value="{$row.carrier_id_relation}">
                <span id="carrier_id_addon"></span> <br>
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-investment_name" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>投资方名称:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control " id="investment_name" name="row[investment_name]" type="text" placeholder="请填写投资方名称"  data-rule="required" value="{$row.investment_name}">
                <!-- <span class="msg-box n-bottom"></span> -->
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-investment_area" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>投资方地区:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control " id="investment_area" name="row[investment_area]" type="text" placeholder="请填写投资方地区"  data-rule="required" value="{$row.investment_area}">
                <!-- <span class="msg-box n-bottom"></span> -->
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-investment_attribute_ids" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>投资方属性:</label>
            <div class="col-xs-12 col-sm-9">
                {:build_select('row[investment_attribute_ids][]',$investor_attribute,$row.investment_attribute_ids,['id'=>"investment_attribute_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required']) }

                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-project_source_ids" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>项目来源:</label>
            <div class="col-xs-12 col-sm-9">

                {:build_select('row[project_source_ids][]',$project_source,$row.project_source_ids,['id'=>"project_source_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required']) }
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-settle_street_ids" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>落户街道:</label>
            <div class="col-xs-12 col-sm-9">
                {:build_select('row[settle_street_ids][]',$street,$row.settle_street_ids,['id'=>"settle_street_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required']) }
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
        <div class="form-group  col-sm-6 div-city_district_contact" style="height: 50px;">
            <label class="control-label col-xs-12 col-sm-3"><span style="color: red;">*</span>联系人及联系方式:</label>
            <div class="col-xs-12 col-sm-9">
                <input class="form-control " id="city_district_contact" name="row[city_district_contact]" type="text" placeholder="请填写联系人及联系方式"  data-rule="required" value="{$row.city_district_contact}">
                <!-- <span class="msg-box n-bottom"></span> -->
                <span class="msg-box n-bottom"></span>
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <!-- <input id="is_important" name="row[is_important]" value="1" > -->
            <button type="submit" class="btn btn-success btn-embossed">确定</button>
            <button type="reset" class="btn btn-default btn-embossed">重置</button>
        </div>
    </div>
</form>

<script type="text/javascript">
    function clearNoNum(obj){
        obj.value = obj.value.replace(/[^\d.]/g,"");//清除"数字"和"."以外的字符
        obj.value = obj.value.replace(/^\./g,"");//验证第一个字符是数字而不是字符
        obj.value = obj.value.replace(/\.{2,}/g,".");//只保留第一个.清除多余的
        obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
        obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');//只能输入两个小数
    }
</script>